package cn.yunhe.dao.impl;

import cn.yunhe.dao.IRecordDao;
import cn.yunhe.entity.Record;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class RecordDao extends HibernateDaoSupport implements IRecordDao {
    @Override
    public Record get(int rid) {
        return getHibernateTemplate().get(Record.class,rid);
    }

    @Override
    public void addRecord(Record record) {
        getHibernateTemplate().save(record);
    }

    @Override
    public void delRecord(int rid) {
        getHibernateTemplate().delete(get(rid));
    }
}
